<template>
  <section>
    <Home />
    <div id="wrap">
      <hr />
      <span id="welcome">欢迎加入我们!</span>
      <hr />
      <div class="tag">
        <div :class="num == 1 ? 'active' : ''" @click="num = 1">
          账号登录
          <hr />
        </div>
        <div :class="num == 2 ? 'active' : ''" @click="num = 2">
          账号注册
          <hr />
        </div>
      </div>
      <Log class="login" v-show="num == 1"></Log>
      <Register class="signin" v-show="num == 2"></Register>
    </div>
    <router-view></router-view>
  </section>
</template>

<script>
import Log from "./coms/log";
import Register from "./coms/register";
import Home from "../home/index.vue";

export default {
  components: {
    Log,
    Register,
    Home,
  },
  data() {
    return {
      num: 1,
      activeIndex: "4",
    };
  },
};
</script>

<style lang="scss" scoped>
* {
  position: relative;
}
.tag {
  width: 540px;
  height: 64px;
}

.tag div {
  float: left;
  width: 220px;
  height: 60px;
  font-size: 36px;
  line-height: 55px;
  text-align: left;
  color: #94999f;
  font-family: SourceHanSansSC-regular;
}
.tag hr {
  width: 145px;
  height: 2px;
  margin: 0;
  display: none;
  border: none;
}
.tag .active {
  color: #3370ff;
}
.tag .active hr {
  background-color: #3370ff;
  display: block;
}

hr {
  width: 100%;
  background-color: #fff;
}
#welcome {
  font-size: 20px;
  color: #3960ac;
}
#wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}


.demo-ruleForm {
  width: 740px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
/deep/ .el-form-item__label {
  width: 48px;
  height: 36px;
  color: rgba(42, 42, 42, 100);
  font-size: 24px;
  text-align: left;
  font-family: SourceHanSansSC-regular;
}

/deep/ .el-form-item__label:before {
  display: none;
}
/deep/ .el-input {
  width: 500px;
  height: 36px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 100);
  text-align: center;
}
/deep/ .el-form-item.is-required {
  margin-bottom: 25px;
  padding-left: 120px;
}
/deep/ .el-button {
  width: 630px;
  height: 56px;
  line-height: 20px;
  border-radius: 8px;
  margin-top: 50px;
  background-color: rgba(51, 112, 255, 100);
  color: rgba(255, 255, 255, 100);
  font-size: 24px;
  text-align: center;
  font-family: Roboto;
  border: 1px solid rgba(229, 229, 230, 100);
}
</style>